{% extends "front/settings.html" %}

{% block content %}
<div class="profile-container">
    <div class="profile-header">
        <div class="avatar-section">
            <img src="{{ url_for('media.get_avatar', filename=g.user.avatar) if g.user.avatar else url_for('static', filename='images/default_avatar.png') }}"
                 alt="用户头像" class="user-avatar">
            <h3>{{ g.user.username }}</h3>
        </div>
    </div>

    <div class="profile-info">
        <div class="info-item">
            <label>用户名:</label>
            <span>{{ g.user.username }}</span>
        </div>

        <div class="info-item">
            <label>邮箱:</label>
            <span>{{ g.user.email }}</span>
        </div>

        <div class="info-item">
            <label>签名:</label>
            <span>{{ g.user.signature if g.user.signature else '暂无签名' }}</span>
        </div>

        <div class="info-item">
            <label>注册时间:</label>
            <span>{{ g.user.join_time.strftime('%Y-%m-%d %H:%M:%S') if g.user.join_time else '' }}</span>
        </div>

        <div class="info-item">
            <label>用户状态:</label>
            <span class="{% if g.user.is_active %}status-active{% else %}status-inactive{% endif %}">
                {% if g.user.is_active %}活跃{% else %}禁用{% endif %}
            </span>
        </div>
    </div>
</div>
{% endblock %}
